Optimal. Leaf size=38 \[ -\frac {\sec ^2(c+b x) \sin (a-c)}{2 b}+\frac {\cos (a-c) \tan (c+b x)}{b} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.03, antiderivative size = 38, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 5, integrand size = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {4679, 2686, 30,
3852, 8} \begin {gather*} \frac {\cos (a-c) \tan (b x+c)}{b}-\frac {\sin (a-c) \sec ^2(b x+c)}{2 b} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 30
Rule 2686
Rule 3852
Rule 4679
Rubi steps
\begin {align*} \int \cos (a+b x) \sec ^3(c+b x) \, dx &=\cos (a-c) \int \sec ^2(c+b x) \, dx-\sin (a-c) \int \sec ^2(c+b x) \tan (c+b x) \, dx\\ &=-\frac {\cos (a-c) \text {Subst}(\int 1 \, dx,x,-\tan (c+b x))}{b}-\frac {\sin (a-c) \text {Subst}(\int x \, dx,x,\sec (c+b x))}{b}\\ &=-\frac {\sec ^2(c+b x) \sin (a-c)}{2 b}+\frac {\cos (a-c) \tan (c+b x)}{b}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.22, size = 35, normalized size = 0.92 \begin {gather*} -\frac {\sec (c) \sec ^2(c+b x) (\sin (a)-\cos (a-c) \sin (c+2 b x))}{2 b} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.90, size = 56, normalized size = 1.47
method | result | size |
default | \(-\frac {1}{2 b \left (\sin \left (a \right ) \cos \left (c \right )-\cos \left (a \right ) \sin \left (c \right )\right ) \left (-\tan \left (b x +a \right ) \cos \left (a \right ) \sin \left (c \right )+\tan \left (b x +a \right ) \sin \left (a \right ) \cos \left (c \right )+\cos \left (a \right ) \cos \left (c \right )+\sin \left (a \right ) \sin \left (c \right )\right )^{2}}\) | \(56\) |
risch | \(\frac {i \left (2 \,{\mathrm e}^{i \left (2 b x +5 a +c \right )}+{\mathrm e}^{i \left (5 a -c \right )}+{\mathrm e}^{i \left (3 a +c \right )}\right )}{\left ({\mathrm e}^{2 i \left (b x +a +c \right )}+{\mathrm e}^{2 i a}\right )^{2} b}\) | \(61\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 382 vs.
\(2 (36) = 72\).
time = 0.29, size = 382, normalized size = 10.05 \begin {gather*} -\frac {{\left (2 \, \sin \left (2 \, b x + 2 \, a + 2 \, c\right ) + \sin \left (2 \, a\right ) + \sin \left (2 \, c\right )\right )} \cos \left (4 \, b x + a + 5 \, c\right ) + 2 \, {\left (2 \, \sin \left (2 \, b x + 2 \, a + 2 \, c\right ) + \sin \left (2 \, a\right ) + \sin \left (2 \, c\right )\right )} \cos \left (2 \, b x + a + 3 \, c\right ) + {\left (\sin \left (2 \, a\right ) + \sin \left (2 \, c\right )\right )} \cos \left (a + c\right ) - {\left (2 \, \cos \left (2 \, b x + 2 \, a + 2 \, c\right ) + \cos \left (2 \, a\right ) + \cos \left (2 \, c\right )\right )} \sin \left (4 \, b x + a + 5 \, c\right ) + 2 \, \cos \left (a + c\right ) \sin \left (2 \, b x + 2 \, a + 2 \, c\right ) - 2 \, {\left (2 \, \cos \left (2 \, b x + 2 \, a + 2 \, c\right ) + \cos \left (2 \, a\right ) + \cos \left (2 \, c\right )\right )} \sin \left (2 \, b x + a + 3 \, c\right ) - {\left (\cos \left (2 \, a\right ) + \cos \left (2 \, c\right )\right )} \sin \left (a + c\right ) - 2 \, \cos \left (2 \, b x + 2 \, a + 2 \, c\right ) \sin \left (a + c\right )}{b \cos \left (4 \, b x + a + 5 \, c\right )^{2} + 4 \, b \cos \left (2 \, b x + a + 3 \, c\right )^{2} + 4 \, b \cos \left (2 \, b x + a + 3 \, c\right ) \cos \left (a + c\right ) + b \cos \left (a + c\right )^{2} + b \sin \left (4 \, b x + a + 5 \, c\right )^{2} + 4 \, b \sin \left (2 \, b x + a + 3 \, c\right )^{2} + 4 \, b \sin \left (2 \, b x + a + 3 \, c\right ) \sin \left (a + c\right ) + b \sin \left (a + c\right )^{2} + 2 \, {\left (2 \, b \cos \left (2 \, b x + a + 3 \, c\right ) + b \cos \left (a + c\right )\right )} \cos \left (4 \, b x + a + 5 \, c\right ) + 2 \, {\left (2 \, b \sin \left (2 \, b x + a + 3 \, c\right ) + b \sin \left (a + c\right )\right )} \sin \left (4 \, b x + a + 5 \, c\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 2.05, size = 40, normalized size = 1.05 \begin {gather*} \frac {2 \, \cos \left (b x + c\right ) \cos \left (-a + c\right ) \sin \left (b x + c\right ) + \sin \left (-a + c\right )}{2 \, b \cos \left (b x + c\right )^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: HeuristicGCDFailed} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 315 vs.
\(2 (36) = 72\).
time = 0.46, size = 315, normalized size = 8.29 \begin {gather*} -\frac {\tan \left (\frac {1}{2} \, a\right )^{6} \tan \left (\frac {1}{2} \, c\right )^{6} + 3 \, \tan \left (\frac {1}{2} \, a\right )^{6} \tan \left (\frac {1}{2} \, c\right )^{4} + 3 \, \tan \left (\frac {1}{2} \, a\right )^{4} \tan \left (\frac {1}{2} \, c\right )^{6} + 3 \, \tan \left (\frac {1}{2} \, a\right )^{6} \tan \left (\frac {1}{2} \, c\right )^{2} + 9 \, \tan \left (\frac {1}{2} \, a\right )^{4} \tan \left (\frac {1}{2} \, c\right )^{4} + 3 \, \tan \left (\frac {1}{2} \, a\right )^{2} \tan \left (\frac {1}{2} \, c\right )^{6} + \tan \left (\frac {1}{2} \, a\right )^{6} + 9 \, \tan \left (\frac {1}{2} \, a\right )^{4} \tan \left (\frac {1}{2} \, c\right )^{2} + 9 \, \tan \left (\frac {1}{2} \, a\right )^{2} \tan \left (\frac {1}{2} \, c\right )^{4} + \tan \left (\frac {1}{2} \, c\right )^{6} + 3 \, \tan \left (\frac {1}{2} \, a\right )^{4} + 9 \, \tan \left (\frac {1}{2} \, a\right )^{2} \tan \left (\frac {1}{2} \, c\right )^{2} + 3 \, \tan \left (\frac {1}{2} \, c\right )^{4} + 3 \, \tan \left (\frac {1}{2} \, a\right )^{2} + 3 \, \tan \left (\frac {1}{2} \, c\right )^{2} + 1}{4 \, {\left (2 \, \tan \left (b x + a\right ) \tan \left (\frac {1}{2} \, a\right )^{2} \tan \left (\frac {1}{2} \, c\right ) - 2 \, \tan \left (b x + a\right ) \tan \left (\frac {1}{2} \, a\right ) \tan \left (\frac {1}{2} \, c\right )^{2} + \tan \left (\frac {1}{2} \, a\right )^{2} \tan \left (\frac {1}{2} \, c\right )^{2} + 2 \, \tan \left (b x + a\right ) \tan \left (\frac {1}{2} \, a\right ) - \tan \left (\frac {1}{2} \, a\right )^{2} - 2 \, \tan \left (b x + a\right ) \tan \left (\frac {1}{2} \, c\right ) + 4 \, \tan \left (\frac {1}{2} \, a\right ) \tan \left (\frac {1}{2} \, c\right ) - \tan \left (\frac {1}{2} \, c\right )^{2} + 1\right )}^{2} {\left (\tan \left (\frac {1}{2} \, a\right )^{2} \tan \left (\frac {1}{2} \, c\right ) - \tan \left (\frac {1}{2} \, a\right ) \tan \left (\frac {1}{2} \, c\right )^{2} + \tan \left (\frac {1}{2} \, a\right ) - \tan \left (\frac {1}{2} \, c\right )\right )} b} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F(-1)]
time = 0.00, size = -1, normalized size = -0.03 \begin {gather*} \text {Hanged} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________